<?php



class ReceiptMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.ReceiptMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('receipt');
		$tMap->setPhpName('Receipt');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('STATUS_ID', 'StatusId', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('ANONYMOUS_ID', 'AnonymousId', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('UID', 'Uid', 'string', CreoleTypes::VARCHAR, false, 32);

		$tMap->addColumn('ITEMS_QNT', 'ItemsQnt', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('RECEIPT_ITEMS_QNT', 'ReceiptItemsQnt', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('TAX', 'Tax', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('TOTAL_PRICE', 'TotalPrice', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('CURRENCY_CODE', 'CurrencyCode', 'string', CreoleTypes::VARCHAR, false, 4);

		$tMap->addColumn('SHIPPING_ID', 'ShippingId', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('SHIPPING_PRICE', 'ShippingPrice', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('COMPLETED_AT', 'CompletedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 